﻿#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

bool check(string& a, string& b)
{
    int hash1[30] = {0};
    int hash2[30] = {0};
    for (auto& e : a) hash1[e - 'a']++;
    for (auto& e : b) hash2[e - 'a']++;
    for (int i = 0; i < 26; i++)
    {
        if (hash1[i] != 0 && hash2[i] != 0) return true;
    }
    return false;
}

int main() {
    int t;
    cin >> t;
    while (t--)
    {
        int n;
        cin >> n;
        vector<string> arr;
        while (n--)
        {
            string tmp;
            cin >> tmp;
            arr.push_back(tmp);
        }

        int left = 0, right = arr.size() - 1;
        int flag = 1;
        while (left < right)
        {
            if (check(arr[left], arr[right]))
            {
                left++;
                right--;
            }
            else
            {
                flag = 0;
                break;
            }
        }
        if (flag) cout << "Yes" << endl;
        else cout << "No" << endl;
    }
}